Governance and Conway Era
The Conway era introduces significant on-chain governance features to the Cardano blockchain, as outlined in CIP-1694 (opens in a new tab). These enhancements enable ADA holders to participate in various on-chain decisions. Lucid Evolution now supports key governance actions, allowing users to engage in the democratic process of the Cardano ecosystem.
For ADA Holders
As an ADA holder, you can participate in governance through various voting strategies and delegation options.
To be able to delegate your voting power, you must first register the associated stake address and query the reward address. Learn more about stake address registration here.
Voting Delegation
Delegate your voting power to a specific DRep
await lucid.newTx()
.delegate.VoteToDRep(rewardAddress, drep)
Register a stake address and delegate voting power to a DRep in one action
await lucid.newTx()
.registerAndDelegate.ToDrep(rewardAddress, drep)
Delegate both your ADA stake to a pool and your voting power to a DRep in one action
await lucid.newTx()
.delegate.VoteToPoolAndDrep(rewardAddress, poolId, drep)
You can also register a stake address, delegate to a pool, and vote to a DRep (e.g., AlwaysAbstain
) in one action:
await lucid.newTx()
.registerAndDelegate.ToPoolAndDRep(rewardAddress, poolId, {
__typename: "AlwaysAbstain",
})
Predefined Voting Strategies
Always Abstain
await lucid.newTx()
.delegate.VoteToDRep(rewardAddress, {
__typename: "AlwaysAbstain",
})
Always No Confidence
await lucid.newTx()
.delegate.VoteToDRep(rewardAddress, {
__typename: "AlwaysNoConfidence",
})
For DReps
As a Delegated Representative (DRep), you can manage your status and information on the network.
Managing DRep Status
Register a stake address as a DRep
await lucid.newTx()
.register.DRep(rewardAddress)
Update DRep information
await lucid.newTx()
.updateDRep(rewardAddress)
Deregister a DRep stake address
await lucid.newTx()
.deregister.DRep(rewardAddress)
Remember to register the associated stake address before registering as a DRep. This way you will be able to query the reward address and update the DRep information. Learn more about stake address registration here.
Script-based DReps
Lucid Evolution supports script-based DReps, enabling programmatic voting behavior for more complex governance strategies
Register Script DRep
await lucid
.newTx()
.register.DRep(rewardAddress)
.attach.Script(script)
Deregister Script DRep
await lucid
.newTx()
.deregister.DRep(rewardAddress)
Example
To use these governance methods, initialize the TxBuilder
configuration by calling newTx()
after setting up Lucid:
// You can define a DRep object
const drep: DRep = { __typename: "AlwaysAbstain" }; // Example AlwaysAbstain DRep
// Create and complete the transaction
const tx = await lucid
.newTx()
.delegate.VoteToDRep(rewardAddress, drep)
.complete();