# Using a smart contract as the Reward Wallet

**URL:** <https://forum.cardano.org/t/using-a-smart-contract-as-the-reward-wallet/53207>\
**Category:** Setup a Stake Pool\
**Created:** [12 March 2021 11:58 UTC](https://forum.cardano.org/t/using-a-smart-contract-as-the-reward-wallet/53207 "2021-03-12T11:58:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Nistor](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/adrian_nistor/32/28166_2.png) [@Adrian\_Nistor](https://forum.cardano.org/u/Adrian_Nistor)\
**Post date:** [12 March 2021 11:58 UTC](https://forum.cardano.org/t/using-a-smart-contract-as-the-reward-wallet/53207/1 "2021-03-12T11:58:05Z")

</div>

I am looking to setup a stake pool, where the SPO rewards are distributed based on rules defined on a smart contract. Any chances that we can set a smart contract to govern the SPOs rewards?  
(e.g. Give a certain address the right to claim x% from the rewards of the SPO’s rewards)

---

<div class="post-metadata">

**Author:** ![jochen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jochen/32/35307_2.png) [@jochen](https://forum.cardano.org/u/jochen)\
**Post date:** [28 September 2021 01:19 UTC](https://forum.cardano.org/t/using-a-smart-contract-as-the-reward-wallet/53207/2 "2021-09-28T01:19:10Z")

</div>

Looking for the same.  
Are there any examples to get going?

---

<div class="post-metadata">

**Author:** ![bwbush](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/bwbush/32/29827_2.png) [@bwbush](https://forum.cardano.org/u/bwbush)\
**Post date:** [28 September 2021 02:54 UTC](https://forum.cardano.org/t/using-a-smart-contract-as-the-reward-wallet/53207/3 "2021-09-28T02:54:36Z")

</div>

I don’t know of examples. The command `cardano-cli transaction build --withdrawal-script-file` would let delegators redeem their rewards according to the contract. It looks like `cardano-cli stake-address build` doesn’t support scripts yet, so you’d have to build the script address manually.

Although you could use a smart contract as a credential for this, the contract might need to be pretty elaborate or expensive if many addresses were involved. _It would also have to be tested very thoroughly on `testnet` before even considering deploying it on `mainnet`—a bug in the contract might lose or lock a lot of funds._
