r/algotradingcrypto • • 6d ago

A simple paid-service contract in Algorand Python, live on mainnet and free to fork

I built a small example contract with AlgoKit and Algorand Python and deployed it to mainnet through Lora App Lab.

- service(payment, value) needs a 0.1 ALGO payment sent straight to the creator and returns value².
- It rejects underpayment, the wrong receiver and rekey or close-out tricks.
- get_total_fees, get_calls and get_fee only read data, and set_fee is for the creator only.

App ID: 3780553713
https://lora.algokit.io/mainnet/application/3780553713

Code (MIT): https://github.com/McCoyirl147/fee-service-algorand

It's a learning example and hasn't been audited, so feedback is welcome.

0 Upvotes

4 comments sorted by

1

u/KookilySolid 6d ago

Pretty slick little contract. The value² return is a fun touch, makes me wonder what kind of use case you'd actually plug that into beyond just testing the mechanism.

Starred the repo, might poke around later and see how the rekey protection is set up.

1

u/mccoy00007 6d ago

Im just trying to find something I can actually use to try and make some kind of passive income! I got screwed over by my ex wife and hoping something can come of these if I can get some direction! Cheers for replying!!

1

u/mccoy00007 6d ago

Squaring is just a placeholder so the payment flow is easy to see. The same pattern pay the creator in the same group then run the call & works for pay-per-use things like an on-chain price or data lookup. A paid API key or licence check or a small "tip to unlock" rekey and close-remainder checks are in service contract.py if you look. Happy to hear any suggestions??

1

u/mccoy00007 6d ago

If you have any thoughts on this or what you think let me know!? Cheers