- Low-privileged delegates are ideal for performing routine tasks such as staking and farming.
- High-privileged delegates can be used for more sensitive operations like trading and transfers.
- It reduces the risk of unauthorized operations and accidental mistakes.
- Even if a delegate is compromised, the impact is limited to the permissions granted to them.
Permissions
Permissions are protocol-specific capabilities defined by each integration program. They represent the smallest units of access that can be granted to delegates, allowing for fine-grained control over what actions each delegate can perform. Permission bitflags are stored asu64 integers, allowing for a maximum of 64 permissions per protocol.
Follow the links in the table to view the permission definitions in program IDLs.
| Protocol | Permission Name | Permission Bitflag | Description |
|---|---|---|---|
| System | WSOL | 0b0000000000000001 | Wrap SOL to wSOL |
| Transfer | 0b0000000000000010 | Transfer vault SOL an allowlisted address | |
| Jupiter Swap | SwapAny | 0b0000000000000001 | Swap any token to any other token |
| SwapLst | 0b0000000000000010 | Swap among SOL and LSTs | |
| SwapAllowlisted | 0b0000000000000100 | Swap tokens that are explicitly allowlisted | |
| SPL | Transfer | 0b0000000000000001 | Transfer vault token an allowlisted address |
| Drift Protocol | InitUser | 0b0000000000000001 | Initialize Drift user account |
| UpdateUser | 0b0000000000000010 | Update Drift user account settings | |
| DeleteUser | 0b0000000000000100 | Delete Drift user account | |
| Deposit | 0b0000000000001000 | Deposit tokens into Drift | |
| Withdraw | 0b0000000000010000 | Withdraw tokens from Drift | |
| Borrow | 0b0000000000100000 | Borrow tokens on Drift | |
| CreateModifyOrders | 0b0000000001000000 | Create or modify trading orders | |
| CancelOrders | 0b0000000010000000 | Cancel existing orders | |
| PerpMarkets | 0b0000000100000000 | Access perpetual markets | |
| SpotMarkets | 0b0000001000000000 | Access spot markets | |
| Drift Vaults | Deposit | 0b0000000000000001 | Deposit into Drift vaults |
| Withdraw | 0b0000000000000010 | Withdraw from Drift vaults | |
| Kamino Lending | Init | 0b0000000000000001 | Initialize Kamino lending account |
| Deposit | 0b0000000000000010 | Deposit tokens into Kamino lending | |
| Withdraw | 0b0000000000000100 | Withdraw tokens from Kamino lending | |
| Borrow | 0b0000000000001000 | Borrow tokens on Kamino lending | |
| Repay | 0b0000000000010000 | Repay borrowed tokens | |
| Kamino Vaults | Deposit | 0b0000000000000001 | Deposit into Kamino vaults |
| Withdraw | 0b0000000000000010 | Withdraw from Kamino vaults | |
| Kamino Farms | Stake | 0b0000000000000001 | Stake tokens in Kamino farms |
| Unstake | 0b0000000000000010 | Unstake tokens from Kamino farms | |
| HarvestReward | 0b0000000000000100 | Harvest farming rewards | |
| CCTP | Transfer | 0b0000000000000001 | Bridge asset to another chain |
Pending Audit
This table lists permissions defined by integration programs that are pending audit.| Protocol | Permission Name | Permission Bitflag | Description |
|---|---|---|---|
| Stake Program | Stake | 0b0000000000000001 | Stake SOL to a validator |
| Unstake | 0b0000000000000010 | Unstake from a validator | |
| Stake Pool | DepositSol | 0b0000000000000001 | Deposit SOL to a pool |
| DepositStake | 0b0000000000000010 | Deposit stake account to a pool | |
| WithdrawSol | 0b0000000000000100 | Withdraw SOL from a pool | |
| WithdrawStake | 0b0000000000001000 | Withdraw stake account from a pool | |
| Sanctum | DepositSol | 0b0000000000000001 | Deposit SOL to a pool |
| DepositStake | 0b0000000000000010 | Deposit stake account to a pool | |
| WithdrawSol | 0b0000000000000100 | Withdraw SOL from a pool | |
| WithdrawStake | 0b0000000000001000 | Withdraw stake account from a pool | |
| Marinade | Stake | 0b0000000000000001 | Stake SOL to get mSOL |
| Unstake | 0b0000000000000010 | Unstake mSOL to get SOL |